package com.example.bili.service.impl;

import com.example.bili.dao.FavorDao;
import com.example.bili.dao.FavorMapper;
import com.example.bili.entity.Favor;
import com.example.bili.service.FavorService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class FavorServicelmpl implements FavorService {
    @Resource
    private FavorMapper favorMapper;
    @Resource
    private FavorDao favorDao;
    @Override
    public boolean add(int userId, int trendId, int favorerId) {
        return favorMapper.add(userId, trendId, favorerId)>0;
    }



    @Override
    public boolean addFavor(Favor favor) {
        return favorDao.addFavor(favor)>0;
    }

    @Override
    public boolean delFavor(int id) {
        return favorDao.delFavor(id)>0;
    }
}
